<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>发布新闻</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script type="application/x-javascript"> addEventListener("load", function () {
        setTimeout(hideURLbar, 0);
    }, false);

    function hideURLbar() {
        window.scrollTo(0, 1);
    } </script>
    <link href="css/bootstrap.css" rel='stylesheet' type='text/css'/>
    <link href='https://fonts.googleapis.com/css?family=Open+Sans:700,700italic,800,300,300italic,400italic,400,600,600italic'
          rel='stylesheet' type='text/css'>
    <!--Custom-Theme-files-->
    <link href="css/style.css" rel='stylesheet' type='text/css'/>
    <script src="js/jquery.min.js"></script>
    <!--/script-->
    <script type="text/javascript" src="js/move-top.js"></script>
    <script type="text/javascript" src="js/easing.js"></script>
    <script type="text/javascript">
        jQuery(document).ready(function ($) {
            $(".scroll").click(function (event) {
                event.preventDefault();
                $('html,body').animate({scrollTop: $(this.hash).offset().top}, 900);
            });
        });
    </script>

</head>
<body>
<!-- header-section-starts -->
<div class="h-top" id="home">
    <div class="top-header">
        <ul class="cl-effect-16 top-nag">
            <li><a href="register.jsp" data-hover="Registration">Registration</a></li>
            <li><a href="about.jsp" data-hover="About">About</a></li>
            <li><a href="services.html" data-hover="SERVICES">SERVICES</a></li>
            <li><a href="login.jsp" data-hover="Login">Login</a></li>
            <li><a href="contact.html" data-hover="CONTACT">Contact</a></li>
        </ul>
        <div class="search-box">
            <div class="b-search">
                <form>
                    <input type="text" value="Search" onfocus="this.value = '';"
                           onblur="if (this.value == '') {this.value = 'Search';}">
                    <input type="submit" value="">
                </form>
            </div>
        </div>

        <div class="clearfix"></div>
    </div>
</div>
<div class="full">
    <div class="col-md-3 top-nav grid-sec">
        <div class="logo">
            <a href="index.jsp"><h1>Blogger</h1></a>
        </div>
        <div class="top-menu">
            <span class="menu"> </span>
            <ul class="cl-effect-16">
                <li><a class="active" href="index.jsp" data-hover="HOME">主页</a></li>
                <li><a href="about.jsp" data-hover="About">个人信息</a></li>
                <li><a href="services.html" data-hover="Services">我的动态</a></li>
                <li><a href="news.jsp" data-hover="Gallery">发布新帖</a></li>
                <li><a href="contact.html" data-hover="CONTACT">Contact</a></li>
            </ul>
            <!-- script-for-nav -->
            <script>
                $("span.menu").click(function () {
                    $(".top-menu ul").slideToggle(300, function () {
                        // Animation complete.
                    });
                });
            </script>
            <!-- script-for-nav -->
            <ul class="side-icons">
                <li><a class="fb" href="#"></a></li>
                <li><a class="twitt" href="#"></a></li>
                <li><a class="goog" href="#"></a></li>
                <li><a class="drib" href="#"></a></li>
            </ul>
        </div>
    </div>
    <form action="UserAddNewsServlet" method="post">
        <div class="col-md-9 main">
            <!--grids-->
            <div class="grid-section">
                <h3 class="tittle">Grids <i class="glyphicon glyphicon-stop"></i></h3>
                <div class="form-group">
                    <div class="row">
                        <div class="col-md-12">
                            新闻标题： <input type="text" name="title">
                        </div>
                        <div class="clearfix"></div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="row">
                        <div class="col-md-12 grid_box1">
                            新闻内容： <input type="text" name="content">
                        </div>
                        <div class="clearfix"></div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="row">
                        <div class="col-md-12 grid_box1">
                           <%-- 发布人： <input type="text" name="user">--%>
                               发布人：${loginuser.username}
                        </div>
                        <div class="clearfix"></div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="row">
                        <div class="col-md-4 grid_box1">
                            所属版块：
                            <select name="bitemid">
                            <option value="">--全部类别--</option>
                            <c:forEach items="${blockItems}" var="bi">
                                <option value="${bi.blockid}">${bi.blockname}</option>
                            </c:forEach>
                            </select>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="row">
                        <div class="col-md-4 grid_box1">
                             <input type="submit" value="添加新闻">
                        </div>
                        <div class="clearfix"></div>
                    </div>
                </div>
                <div class="clearfix"></div>
            </div>
            <div class="clearfix"></div>
        </div>
    </form>
</div>
<!--//footer-->
<!--start-smooth-scrolling-->
<script type="text/javascript">
    $(document).ready(function () {
        $().UItoTop({easingType: 'easeOutQuart'});

    });
</script>
<a href="#home" id="toTop" class="scroll" style="display: block;"> <span id="toTopHover"
                                                                         style="opacity: 1;"> </span></a>


</body>
</html>